<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>

<script language="JavaScript"> 
	document.getElementById('indexes').style.display = 'block';
</script>


<%@ include file="/WEB-INF/jsp/partnerTools.jsp" %>

<H2>Food price index </H2>
<img src="http://www.erepublik.com/images/icons/industry/1/q1.png"/> 
<img src="http://www.erepublik.com/images/icons/industry/1/q2.png"/> 
<img src="http://www.erepublik.com/images/icons/industry/1/q3.png"/> 
<img src="http://www.erepublik.com/images/icons/industry/1/q4.png"/> 
<img src="http://www.erepublik.com/images/icons/industry/1/q5.png"/> 
<BR/>
Page show the amount of wellness which can be restored with food for the price of 1 <img src="http://34all.org/erep/gold.gif"/><br/>
This means that the more wellness/happiness can be restored, the cheaper food is.
<br/>
<br/>

<table class="searchTable">
	<form:form method="POST" commandName="priceFoodSearchCriteria">


	<!-- 
	<tr>	
		<td>
			Show price as:
		</td>
		<td>
			<form:select path="foodPrice">
				<form:options  itemLabel="name" />
			</form:select>
		</td>
		
	</tr> -->
	
	<tr>
		<td colspan="2">
			<center><input type="submit" value="Show Prices"></center>
		</td>
	</tr>
	</form:form>
</table>



<%@ include file="/WEB-INF/jsp/commercials.jsp" %>







<table width="800" border="2" cellpadding="2" cellspacing="0" bordercolor="777777" width="600" style="text-align: center; font-size: 11px">
	
	
	<tr> 
		<td>Country</td> 
		<td> <b>Current price</b> </td> 
		<td> Price 24h ago </td> 
		<td> Price 7 days ago</td> 
		<td> Import tax </td> 
		<td> Vat </td> 
		<td> Population </td> 
		<td> </td> 
	</tr>
		
	<c:forEach var="index" items="${prices}" >
			<tr style="background: none repeat scroll 0% 0% <c:out value="${index.location.color}"/>;">
	 
				<td> 
					<img src="<c:out value="${index.location.url}"/>"/><br/>
					<c:out value="${index.location.name}"/>
					<c:if test="${index.location.type == 'Country'}">
							(<c:out value="${index.location.alliance.name}"/>)
					</c:if>
				</td>
				
				<td> 
					<c:set var="priceToday"><fmt:formatNumber value="${index.price}" maxFractionDigits="2"/></c:set>
					<c:set var="priceYesterday"><fmt:formatNumber value="${index.priceYesterday}" maxFractionDigits="2"/></c:set>
					<c:set var="priceWeekAgo"><fmt:formatNumber value="${index.priceWeekAgo}" maxFractionDigits="2"/></c:set>
					<b><c:out value="${priceToday}"/></b>
				</td>
				
				<td> 				
					<c:out value="${priceYesterday}"/>
				</td>
				
				<td> 
					<c:out value="${priceWeekAgo}"/>
				</td>
				
				<td> 
					<c:out value="${index.importTax}"/>%
				</td>
				
				<td> 
					<c:out value="${index.vat}"/>%
				</td>
				
				<td> 
					<c:out value="${index.population}"/>
				</td>
				
				<td> 
					<a href="priceHistoryChart.html?productType=food&country=<c:out value="${index.location}"/>">Show chart</a>
				</td>
				
			</tr>
	</c:forEach>
		
		
</table>



<%@ include file="/WEB-INF/jsp/bottom.jsp" %>

